package com.wn.cl.park.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author yellow docker
 * @since 2025-03-11
 */
@Getter
@Setter
  @TableName("parking_spots")
@ApiModel(value = "ParkingSpots对象", description = "")
public class ParkingSpots implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("车位ID，主键，自动递增")
      @TableId
      private Long id;

      @ApiModelProperty("关联的停车场ID")
      private Long parkingLotId;

      @ApiModelProperty("车位编号")
      private String spotNumber;

      @ApiModelProperty("状态：0可用或1已占用")
      private Integer status;


      @ApiModelProperty("创建时间")
      @TableField(fill = FieldFill.INSERT)  //在插入操作的时候填充
      private LocalDateTime createdAt;

      @ApiModelProperty("更新时间")
      @TableField(fill = FieldFill.INSERT_UPDATE)  //在插入和更新时填充
      private LocalDateTime updatedAt;

  @Version  //这个字段用于版本控制
  private Integer version;

}
